<?php
date_default_timezone_set("PRC"); // 设置时区

$dsn = "mysql:host=127.0.0.1;dbname=blog";
$db = new PDO($dsn, "root", "123456");
$db->exec("set names utf8mb4");

//
$sql = "SELECT * FROM admin where admin_email='{$adminEmail}'";
$result = $db->query($sql);
$admin = $result->fetch(PDO::FETCH_ASSOC);